package com.mikelouis.test.scala.proginscala.chapter27.recipe

/**
 * Created by yuazhu on 2/25/2015.
 */
object SimpleDatabase extends Database {
  def allFoods = List(Apple, Orange, Cream, Sugar)

  def allRecipes: List[Recipe] = List(FruitSalad)

  private var categories = List(
    FoodCategory("fruits", List(Apple, Orange)),
    FoodCategory("misc", List(Cream, Sugar)))

  def allCategories = categories
}

//object SimpleDatabase {
//  def allFoods = List(Apple, Orange, Cream, Sugar)
//
//  def foodNamed(name: String): Option[Food] =
//    allFoods.find(_.name == name)
//
//  def allRecipes: List[Recipe] = List(FruitSalad)
//}
